{extend name="public:base" /}
{block name="content"}	
<div class="page-header">
	<h1>	
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb2}
		</small>
	</h1>
</div>

<table class="table table-striped table-bordered table-hover search-form">
	<thead>
		<th><input name="title" type="text" placeholder="用户名" value="{:input('title')}" /></th>
		<th><input name="title" type="text" placeholder="昵称" value="{:input('title')}" /></th>
		<th>    				
			<select name="cat">
				<option value="">-所有分组-</option>
				
				{volist name="group" id="g"}
					<option value="{$g.id}">{$g.title}</option>
				{/volist}
				
				
			</select>
		</th>
		<th>
			<a class="btn btn-primary" href="javascript:;" id="search" url="{:url('Item/index')}">查询</a>
		</th>
	</thead>
</table>
	
<div class="row">
	<div class="col-xs-12">	
		<div>
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th>头像</th>	
						<th>用户名</th>						
						<th>昵称</th>						
						<th>会员组</th>
						<th>状态</th>						
						<th>操作</th>	
					</tr>
				</thead>
				<tbody>
						
						{volist name="list" id="m" empty="$empty"}
						<tr>
							<td>
								{if condition="$m['userpic']"}
		                  		<img src="IMG_ROOT{$m.userpic|resize=40,40}" />
			                  	{else /}
			                  		<img src="__PUBLIC__/image/no_image_40x40.jpg" />
			                  	{/if}
							</td>
							<td>
								{$m.username}
							</td>
							<td>{$m.nickname}</td>
							<td>{$m.title}</td>
							<td>
								{switch name="m.checked"}
									{case value="1"}<a href='{:url("member/set_status",array("id"=>$m["userid"],"status"=>0))}'><span class="btn btn-xs btn-success"><i class="fa fa-check bigger-120"></i></span></a>{/case}
									{case value="0"}<a href='{:url("member/set_status",array("id"=>$m["userid"],"status"=>1))}'><span class="btn btn-xs btn-danger"><i class="fa fa-remove bigger-120"></i></span></a>{/case}
								{/switch}
							</td>
							<td>
								<a  class="btn btn-xs btn-info" href='{:url("member/edit",array("id"=>$m["userid"]))}'>
									<i class="fa fa-edit bigger-120"></i>
								</a> 
								<a class="delete btn btn-xs btn-danger" href='{:url("member/del",array("id"=>$m["userid"]))}' >
									<i class="fa fa-trash bigger-120"></i>
								</a>
							</td>
						</tr>
						{/volist}
						<tr>
							<td colspan="20" class="page">{$list->render()}</td>
						</tr>
						<tr>
							<td colspan="20">总计 {$list->total()|default="0"} </td>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
{/block}
